import 'component/common.scss';
import React from 'react';
import { connect } from 'react-redux';
import { Route, withRouter } from 'react-router-dom';
import Loadable from 'react-loadable';
import BottomBar from '../BottomBar/BottomBar';
import Home from '../Home/Home';
import Loading from './Loading';

const Order = Loadable({
  loader: () => import('../Order/Order'),
  loading: Loading,
});

const My = Loadable({
  loader: () => import('../My/My'),
  loading: Loading,
});

class Main extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
      <div>
        <Route exact path="/home" component={Home} />
        <Route path="/order" component={Order} />
        <Route path="/my" component={My} />
        <BottomBar />
      </div>
    );
  }
}

export default withRouter(connect(
)(Main));